package com.wjw.bms.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.wjw.bms.dao.HzUserinfoDao;
import com.wjw.bms.model.HzUserinfo;

@Repository
public class HzUserinfoDaoImpl extends SqlSessionDaoSupport implements HzUserinfoDao {

	String ns = "com.wjw.bms.mapper.HzUserinfoMapper.";
	/**
	 * 
	* @Title: insertHzUserinfo 增加用户
	* @Description: TODO 
	* @param hzUserInfo
	* @return 返回插入的条数
	* @see com.wjw.bms.dao.HzUserinfoDao#insertHzUserinfo(com.wjw.bms.model.HzUserinfo)
	 */
	public int insertHzUserinfo(HzUserinfo hzUserInfo) {
		int insertCount = this.getSqlSession().insert(ns+"insert", hzUserInfo);
		return insertCount;
	}
	/**
	 * 
	* @Title: getUserInfo  查询所有用户
	* @Description: TODO 
	* @return 
	* @see com.wjw.bms.dao.HzUserinfoDao#getUserInfo()
	 */
	public List<HzUserinfo> getUserInfo() {
		List<HzUserinfo> userinfoList = this.getSqlSession().selectList(ns+"selectAll");
		return userinfoList;
	}
	/**
	 * 修改用户信息
	* @Title: updateHzUserinfo 
	* @Description: TODO 
	* @param hzUserInfo 修改的数据
	* @see com.wjw.bms.dao.HzUserinfoDao#updateHzUserinfo(com.wjw.bms.model.HzUserinfo)
	 */
	public void updateHzUserinfo(HzUserinfo hzUserInfo) {
		this.getSqlSession().update(ns+"updateByPrimaryKeySelective", hzUserInfo);
	}

}
